<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>媒体查询</title>
  <!-- 1、使用媒体查询 link标签引入外部样式表（推荐） -->
  <link rel="stylesheet" media="(max-width:800px)" href="./1-div.css">
  <!-- 2、使用媒体查询 style标签 -->
  <style>
    @media (min-width:1000px) {
      div {
        width: 200px;
        height: 200px;
        background-color: lightcoral;
      }

      body {
        background-color: lavenderblush;
      }

      /* 条件一和条件二都满足 
    
      */
      /* @media (min-width:801px)and(max-width:999px) {
        div {
          font-size: 50px;
        }

      } */

      @media not (min-width:801px) {
        div {
          font-size: 28px;
        }

      }

      /* 打印 */
      @media print {
        .title {
          display: none;
        }

        .tip {
          font-size: 28px;
          /* width: 100px;
          height: 100px;
          background-color: lemonchiffon; */
        }

      }

    }
  </style>
</head>

<body>
  <div class="title">请输入标题：</div>
  <div class="tip">我是一个div</div>

</body>

</html>